package cn.baiy;

import javax.swing.*;

//炸弹类
public class Bomb extends SeaObject{  //继承

    public Bomb(int x,int y){
        super(9,12,x,y,3);
    }

    @Override
    public void move(){
        y += speed; //向下移动
    }

    @Override
    public ImageIcon getImage(){
        return Images.bomb; //返回炸弹图片
    }

    public boolean isOutOfBounds(){
        return y >= World.HEIGHT; //检测炸弹越界
    }
}
